/**********************************************************************************************************************
 *
 * Project:    mGameEngine
 * File:       triangle.h
 * Author:     karooolek
 * Created on: 2012-04-23
 *
 **********************************************************************************************************************/

#ifndef TRIANGLE_H_
#define TRIANGLE_H_

#include "shape.h"
#include "vector3.h"

namespace mGameEngine
{

/**
 * Triangle in 3 dimensional space.
 * Triangle is part of surface created by three points.
 */
class Triangle : public Shape
{
private:
    /**
     * A point.
     */
    Vector3 _a;

    /**
     * B point.
     */
    Vector3 _b;

    /**
     * C point.
     */
    Vector3 _c;

public:
    /**
     * Create triangle with specified points.
     * @param a point.
     * @param b point.
     * @param c point.
     */
    Triangle(const Vector3 &a = Vector3(), const Vector3 &b = Vector3(), const Vector3 &c = Vector3());

    /**
     * Destroy triangle.
     */
    ~Triangle();

    /**
     * Get triangle a point.
     * @return triangle a point.
     */
    const Vector3 &getA() const
    {
        return _a;
    }

    /**
     * Set triangle a point.
     * @param a a point.
     */
    void setA(const Vector3 &a)
    {
        _a = a;
    }

    /**
     * Get triangle b point.
     * @return triangle b point.
     */
    const Vector3 &getB() const
    {
        return _b;
    }

    /**
     * Set triangle b point.
     * @param b b point.
     */
    void setB(const Vector3 &b)
    {
        _b = b;
    }

    /**
     * Get triangle c point.
     * @return triangle c point.
     */
    const Vector3 &getC() const
    {
        return _c;
    }

    /**
     * Set triangle c point.
     * @param c c point.
     */
    void setC(const Vector3 &c)
    {
        _c = c;
    }
};

}

#endif // CAPSULE_H_
